package verbindung;

/**
 * 
 * @author Nilientes
 *
 */
public interface DBDClient {
	/**
	 * retrieves a variable from DBDServer
	 * @param name
	 * @return the value of the variable
	 */
	public int getVar(String name);
	
	/**
	 * sets a var in DBDServer
	 * @param name
	 * @param val
	 */
	public void setVar(String name, int val);
	
	/**
	 * subscribes a variable from DBDServer. Callback is called every time the variable changes
	 * @param name
	 * @param cb
	 * @return the callback or null if not sucsessful
	 */
	public DBDCallback subscribeVar(String name, DBDCallback cb);
	/**
	 * unsubscribes a earlier subscribed variable
	 * @param name
	 */
	public void unsubscribeVar(String name);
	
	/**
	 * closes the connection to servers
	 */
	public abstract void close();
}
